'\" te
'\"! tbl|eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 color.gl 
.ds Xs 48493 5 color.gl
.TH GLCOLOR 3G
.SH NAME
.B "glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub, glColor3ui, glColor3us, glColor4b, glColor4d, glColor4f, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, glColor3bv, glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, glColor3usv, glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv, glColor4uiv, glColor4usv
\- set the current color

.SH C SPECIFICATION
void \f3glColor3b\fP(
GLbyte \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3b( 'u
	GLbyte \fIgreen\fP,
	GLbyte \fIblue\fP )
.fi
void \f3glColor3d\fP(
GLdouble \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3d( 'u
	GLdouble \fIgreen\fP,
	GLdouble \fIblue\fP )
.fi
void \f3glColor3f\fP(
GLfloat \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3f( 'u
	GLfloat \fIgreen\fP,
	GLfloat \fIblue\fP )
.fi
void \f3glColor3i\fP(
GLint \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3i( 'u
	GLint \fIgreen\fP,
	GLint \fIblue\fP )
.fi
void \f3glColor3s\fP(
GLshort \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3s( 'u
	GLshort \fIgreen\fP,
	GLshort \fIblue\fP )
.fi
void \f3glColor3ub\fP(
GLubyte \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3ub( 'u
	GLubyte \fIgreen\fP,
	GLubyte \fIblue\fP )
.fi
void \f3glColor3ui\fP(
GLuint \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3ui( 'u
	GLuint \fIgreen\fP,
	GLuint \fIblue\fP )
.fi
void \f3glColor3us\fP(
GLushort \fIred\fP,
.nf
.ta \w'\f3void \fPglColor3us( 'u
	GLushort \fIgreen\fP,
	GLushort \fIblue\fP )
.fi
void \f3glColor4b\fP(
GLbyte \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4b( 'u
	GLbyte \fIgreen\fP,
	GLbyte \fIblue\fP,
	GLbyte \fIalpha\fP )
.fi
void \f3glColor4d\fP(
GLdouble \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4d( 'u
	GLdouble \fIgreen\fP,
	GLdouble \fIblue\fP,
	GLdouble \fIalpha\fP )
.fi
void \f3glColor4f\fP(
GLfloat \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4f( 'u
	GLfloat \fIgreen\fP,
	GLfloat \fIblue\fP,
	GLfloat \fIalpha\fP )
.fi
void \f3glColor4i\fP(
GLint \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4i( 'u
	GLint \fIgreen\fP,
	GLint \fIblue\fP,
	GLint \fIalpha\fP )
.fi
void \f3glColor4s\fP(
GLshort \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4s( 'u
	GLshort \fIgreen\fP,
	GLshort \fIblue\fP,
	GLshort \fIalpha\fP )
.fi
void \f3glColor4ub\fP(
GLubyte \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4ub( 'u
	GLubyte \fIgreen\fP,
	GLubyte \fIblue\fP,
	GLubyte \fIalpha\fP )
.fi
void \f3glColor4ui\fP(
GLuint \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4ui( 'u
	GLuint \fIgreen\fP,
	GLuint \fIblue\fP,
	GLuint \fIalpha\fP )
.fi
void \f3glColor4us\fP(
GLushort \fIred\fP,
.nf
.ta \w'\f3void \fPglColor4us( 'u
	GLushort \fIgreen\fP,
	GLushort \fIblue\fP,
	GLushort \fIalpha\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\f2red\fP\ \f2green\fP\ \f2blue\fP\ \ 'u 
\f2red\fP, \f2green\fP, \f2blue\fP
Specify new red, green, and blue values for the current color.
.TP
\f2alpha\fP
Specifies a new alpha value for the current color.
Included only in the four-argument \%\f3glColor4\fP commands.
.SH C SPECIFICATION
void \f3glColor3bv\fP(
const GLbyte \fI*v\fP )
.nf
.fi
void \f3glColor3dv\fP(
const GLdouble \fI*v\fP )
.nf
.fi
void \f3glColor3fv\fP(
const GLfloat \fI*v\fP )
.nf
.fi
void \f3glColor3iv\fP(
const GLint \fI*v\fP )
.nf
.fi
void \f3glColor3sv\fP(
const GLshort \fI*v\fP )
.nf
.fi
void \f3glColor3ubv\fP(
const GLubyte \fI*v\fP )
.nf
.fi
void \f3glColor3uiv\fP(
const GLuint \fI*v\fP )
.nf
.fi
void \f3glColor3usv\fP(
const GLushort \fI*v\fP )
.nf
.fi
void \f3glColor4bv\fP(
const GLbyte \fI*v\fP )
.nf
.fi
void \f3glColor4dv\fP(
const GLdouble \fI*v\fP )
.nf
.fi
void \f3glColor4fv\fP(
const GLfloat \fI*v\fP )
.nf
.fi
void \f3glColor4iv\fP(
const GLint \fI*v\fP )
.nf
.fi
void \f3glColor4sv\fP(
const GLshort \fI*v\fP )
.nf
.fi
void \f3glColor4ubv\fP(
const GLubyte \fI*v\fP )
.nf
.fi
void \f3glColor4uiv\fP(
const GLuint \fI*v\fP )
.nf
.fi
void \f3glColor4usv\fP(
const GLushort \fI*v\fP )
.nf
.fi

.SH PARAMETERS
.TP
\f2v\fP
Specifies a pointer to an array that contains red, green, blue,
and (sometimes) alpha values.
.SH DESCRIPTION
The GL stores both a current single-valued color index
and a current four-valued RGBA color.
\%\f3glColor\fP sets a new four-valued RGBA color.
\%\f3glColor\fP has two major variants:
\%\f3glColor3\fP and \%\f3glColor4\fP.
\%\f3glColor3\fP variants specify new red,
green,
and blue values explicitly
and set the current alpha value to 1.0 (full intensity) implicitly.
\%\f3glColor4\fP variants specify all four color components explicitly.
.P
\%\f3glColor3b\fP, \%\f3glColor4b\fP,
\%\f3glColor3s\fP, \%\f3glColor4s\fP, \%\f3glColor3i\fP, and \%\f3glColor4i\fP take 
three or four signed byte, short, or long integers as arguments.
When \f3v\fP is appended to the name,
the color commands can take a pointer to an array of such values.
.P
Current color values are stored in floating-point ,
with unspecified mantissa and exponent sizes.
Unsigned integer color components,
when specified,
are linearly mapped to floating-point values such that the largest
representable value maps to 1.0 (full intensity),
and 0 maps to 0.0 (zero intensity).
Signed integer color components,
when specified,
are linearly mapped to floating-point values such that the most positive
representable value maps to 1.0,
and the most negative representable value maps to \-1.0. (Note that
this mapping does not convert 0 precisely to 0.0.)
Floating-point values are mapped directly.
.P
Neither floating-point nor signed integer values are clamped
to the range [0,1] before the current color is updated.
However,
color components are clamped to this range before they are interpolated
or written into a color buffer.
.SH NOTES
The initial value for the current color is (1, 1, 1, 1). 
.P
The current color can be updated at any time.
In particular,
\%\f3glColor\fP can be called between a call to \%\f3glBegin\fP and the corresponding
call to \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_CURRENT_COLOR\fP
.br
\%\f3glGet\fP with argument \%\f3GL_RGBA_MODE\fP
.SH SEE ALSO
\%\f3glIndex(3G)\fP
